<?php
Class AnswerController extends Controller{

	public function show($id){
	$answer = $this->loader->model('answer');
		$answer->SelectAnswerFromSql($id);
		$this->smarty->assign('answer', $answer);
		$this->smarty->assign('title', 'Kémia éve - Válaszok');
	}
	
	public function showallfromtask($task_id){
		$answer = $this->loader->model('answer');
		$answers = $answer->SelectAllAnswerFromTask($task_id);
		$answercount = count($answers);
		$this->smarty->assign('answer', $answers);
		$this->smarty->assign('answercount', $answercount);
		$this->smarty->assign('title', 'Kémia éve - Válaszok');
	}	
	
	public function newanswer(){
		$answer = $this->loader->model('answer');
		///////
		///////
		///////
		$this->smarty->assign('answer', $answer);
		$this->smarty->assign('title', 'Kémia éve - Új Válasz');
	}
	
	public function edit($id){
		$answer = $this->loader->model('answer');
		///////
		///////
		///////
		$this->smarty->assign('answer', $answer);
		$this->smarty->assign('title', 'Kémia éve - Válasz Módosítása');
	}

	public function delete($id){
		$answer = $this->loader->model('answer');	
		///////
		///////
		///////
		$this->smarty->assign('answer', $answer);
		$this->smarty->assign('title', 'Kémia éve - Válasz Törlése');
	}
		
}
?>